<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>I have a CMakelists.txt file that works properly for the “Unix Makefiles”
type build (Linux) and for VS 2008. When generating a CDT4 project (Linux) from
the same file, library paths are not resolved and the project won’t link. The
library paths are specified using the link_directories command
exclusively. The cmake files are at the same level as the “Src” directory
that contains all source. I am totally stumped as to why this doesn’t work under
CDT4.</DIV>
<DIV> </DIV>
<DIV><FONT size=2 face="Courier New">cmake_minimum_required(VERSION
2.6)</FONT></DIV>
<DIV><FONT size=2 face="Courier New">project(SecondTest_UT)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Compiler options</FONT></DIV>
<DIV><FONT size=2 face="Courier New">if(CMAKE_COMPILER_IS_GNUCXX)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(CMAKE_CXX_FLAGS "-m32 -D
USE_STD_HEADERS -D NO_CSF_INTEROPERABILITY")</FONT></DIV>
<DIV><FONT size=2 face="Courier New">elseif(MSVC)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> add_definitions(/MTd
)</FONT></DIV>
<DIV><FONT size=2
face="Courier New">endif(CMAKE_COMPILER_IS_GNUCXX)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Platform dependency controls</FONT></DIV>
<DIV><FONT size=2 face="Courier New">if(WIN32)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(COE_OS
windows)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(COE_LIB_DIR
nt)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(GENSOFT_LIB_DIR
NTLib_80)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(LIB_EXTENSION
.lib)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(PLATFORM_SPECIFIC_LIBS
ws2_32.lib)</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
set(PLATFORM_SPECIFIC_LINK_DIRS $ENV{COE}/lib/${COE_LIB_DIR})</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(PLATFORM_SPECIFIC_INC_DIRS
)</FONT></DIV>
<DIV><FONT size=2 face="Courier New">elseif(UNIX)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(COE_OS posix)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(COE_LIB_DIR
linux_pc)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(GENSOFT_LIB_DIR
Linux)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(LIB_EXTENSION
)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(PLATFORM_SPECIFIC_LIBS
gs_esw eswHelpers Infrastructure)</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
set(PLATFORM_SPECIFIC_LINK_DIRS $ENV{SIMDIR}/lib $ENV{ESWDIR}/Esw)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> set(PLATFORM_SPECIFIC_INC_DIRS
$ENV{SIMDIR}/sim/src/dropIns/eswInterface/eswHelpers
$ENV{SIMDIR}/sm3Sim/src/dropIns/eswInterface/eswHelpers/intLibStub)</FONT></DIV>
<DIV><FONT size=2 face="Courier New">endif(WIN32)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># COE and genSoft Includes</FONT></DIV>
<DIV><FONT size=2 face="Courier New">include_directories(AFTER </FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GTEST_ROOT}/include</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GENSOFT_HOME}/include</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GENSOFT_HOME}/include/genMath</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GENSOFT_HOME}/include/genSoftLLE</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GENSOFT_HOME}/include/genSoftLog</FONT></DIV>
<DIV><FONT size=2 face="Courier New"> $ENV{COE}/include</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{COE}/include/${COE_OS}</FONT></DIV>
<DIV><FONT size=2 face="Courier New">)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># GS-ESW Includes</FONT></DIV>
<DIV><FONT size=2 face="Courier New">include_directories(AFTER </FONT></DIV>
<DIV><FONT size=2 face="Courier New">
${PLATFORM_SPECIFIC_INC_DIRS}</FONT></DIV>
<DIV><FONT size=2 face="Courier New">)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Library directory paths</FONT></DIV>
<DIV><FONT size=2 face="Courier New">link_directories(</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GTEST_ROOT}/lib</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{COE}/lib/${COE_LIB_DIR}/cpp</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
${PLATFORM_SPECIFIC_LINK_DIRS}</FONT></DIV>
<DIV><FONT size=2 face="Courier New">
$ENV{GENSOFT_HOME}/lib/genSoftComponentFramework_${GENSOFT_LIB_DIR}</FONT></DIV>
<DIV><FONT size=2 face="Courier New">)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Additional Libraries</FONT></DIV>
<DIV><FONT size=2 face="Courier New">set(GENSOFT_LIBS genSoftD${LIB_EXTENSION}
coeD${LIB_EXTENSION} od_coeD${LIB_EXTENSION}
socket_media_bindingD${LIB_EXTENSION})</FONT></DIV>
<DIV><FONT size=2 face="Courier New">set(GTEST_LIBS gtest_maind${LIB_EXTENSION}
gtestd${LIB_EXTENSION})</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Get local files</FONT></DIV>
<DIV><FONT size=2 face="Courier New">file(GLOB_RECURSE fileNameListStr
Src/*.cpp)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Add the targets</FONT></DIV>
<DIV><FONT size=2 face="Courier New">add_library(SecondTest SHARED
${fileNameListStr})</FONT></DIV>
<DIV><FONT size=2 face="Courier New">add_executable(SecondTestExec
${fileNameListStr})</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"># Associate the additional libs with the
targets</FONT></DIV>
<DIV><FONT size=2 face="Courier New">target_link_libraries(SecondTestExec
${GTEST_LIBS} ${GENSOFT_LIBS} ${PLATFORM_SPECIFIC_LIBS} )</FONT></DIV>
<DIV><FONT size=2 face="Courier New">target_link_libraries(SecondTest
${GTEST_LIBS} ${GENSOFT_LIBS} ${PLATFORM_SPECIFIC_LIBS}
)</FONT></DIV></DIV></DIV></BODY></HTML>