Normalization of the Chern-Simons action in the Dijkgraaf-Witten paper I am trying to understand the seminal paper "Topological gauge theories and group cohomology" by Dijkgraaf and Witten. They consider an oriented three-manifold $M$, compact Lie group $G$ and a $G$-bundle $E$ with a connection. In the case that $E$ is trivial they identify the connection on $E$ with a Lie algebra-valued one-form $A$. Then they choose an invariant bilinear form $\langle - , - \rangle$ on the Lie algebra and define the Chern-Simons action as
$$ S(A) = \frac{k}{8 \pi^2} \int_M \mathrm{Tr} \left( A \wedge dA + \frac{2}{3} A \wedge A \wedge A \right), $$
where $k$ is an arbitrary integer. I think what is missing in this definition is normalization of $\mathrm{Tr}$ required to make this quantity gauge invariant modulo integers. According to my calculations, if $G$ is simply connected, then the correct condition is that $\mathrm{Tr}(h_{\alpha}^2) \in 2 \mathbb Z$ for every coroot $h_{\alpha}$. In particular this is satisfied for trace forms associated to finite-dimensional representations. Can someone confirm whether my conclusion in this case is correct? 
Secondly, they proceed to the case in which $G$ is not simply connected. Then $E$ may be nontrivial. Their first definition of the Chern-Simons action in this case is as follows: take a four manifold $B$ whose boundary is $M$ (this is guaranteed to exist), extend $E$ and $A$ to a bundle with connection over $B$ (as far as I understand this may fail to exist, but at this point we assume existence) and put
$$ S(A) = \frac{k}{8 \pi^2} \int_B \mathrm{Tr} \left( F \wedge F \right). $$
Then they write that "standard argument" shows that if $k$ is an integer, then $S(A)$ is independent, modulo $1$, of the choice of $B$ and the extension of $E$ and $A$ over $B$. They don't reproduce this standard argument, but let me write what I think they mean. Given some other $B'$ with appropriate extension we consider $B$ with its orientation reversed and glue the two together to obtain a closed four-manifold $X$. Then one probably needs to show that the two extensions of $(E,A)$ may be glued together to obtain a $G$-bundle with a connection over the whole $X$. I don't know if this is automatically true, but let's just assume this for now. Then the difference of two values of the Chern-Simons action is
$$ S(A)_{B'} - S(A)_B = \frac{k}{8 \pi^2} \int_X \mathrm{Tr} \left( F \wedge F \right). $$
Now I think one would like to say that the right hand side is an integer. However, I'm not sure if this is true. For example for $G = \mathrm{U}(1)$ one can construct a line bundle over $X = \mathbb{CP}^2$ such that $ \int_X F \wedge F = 4 \pi^2,$ and in this case the right hand side of the formula above is $\frac{1}{2}$. Am I doing something wrong? Maybe some factor of $2$ is implicitly hidden in "$\mathrm{Tr}$" in the abelian case?
Further, I would like to remark that in the case that $G = \mathrm{SU}(n)$ and $\mathrm{Tr}$ - the trace form associated to the fundamental representation we have that $\frac{1}{8 \pi^2} \int_X \mathrm{Tr} (F \wedge F)$ is the integral of the second Chern class of $E$, which is known to be an integer. I don't know if similar statement can be made for other (semi)simple Lie groups.
 A: Let me answer the second part of your question: In the Abelian case there is no trace at all. The term
$$\frac{1}{8\pi^2} \int F\wedge F$$
is indeed the second Chern number of the $U(1)$ bundle. This is an integer only on Spin manifolds (which you can easily prove using the Atiyah-Singer index theorem). For non-Spin manifolds such as $\mathbb{CP}^2$ it can be a half-integer as you pointed out. This is just an indication that the theories with odd $k$ are not well defined on non-Spin manifolds. The theories with $k$ odd are sometimes called spin-Chern-Simons theories and require a choice of spin structure in addition to the $U(1)$ bundle, so they are only consistent on Spin manifolds. They  are examples of spin-TQFTs.
Edit: The proof of integrality on spin manifolds directly follows from the AS index theorem which (forgetting about the metric) states that on a closed four-manifold
$$\text{ind} D = \frac{1}{8\pi^2} \int F\wedge F$$
$\text{ind} D$ just counts zero-modes of the Dirac operator, so it is an integer.
